package com.dzx.design.behavioral.observer.event;

import com.google.common.eventbus.Subscribe;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author dzx
 * @ClassName:
 * @Description:
 * @date 2019年08月14日 15:30:53
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Teacher {

    private String name;

    @Subscribe
    public void subscribe(NotifyParam notifyParam){
        //业务逻辑
        System.out.println(this.name+"收到来自课程"+notifyParam.getCourse().getCourseName()+"中"+notifyParam.getQuestion().getUserName()+"提出的问题"+notifyParam.getQuestion().getQuestionContent());
    }
}
